package com.ean.backpack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ean.backpack.domain.Regioncentercoordinateslist;
import com.ean.backpack.repository.RegioncentercoordinateslistRepository;
import com.ean.backpack.service.RegioncentercoordinateslistService;

@Service
@Transactional
public class RegioncentercoordinateslistServiceImpl implements
		RegioncentercoordinateslistService {

	@Autowired
	RegioncentercoordinateslistRepository regioncentercoordinateslistRepository;

	public long countAllRegioncentercoordinateslists() {
		return regioncentercoordinateslistRepository.count();
	}

	public void deleteRegioncentercoordinateslist(
			Regioncentercoordinateslist regioncentercoordinateslist) {
		regioncentercoordinateslistRepository
				.delete(regioncentercoordinateslist);
	}

	public Regioncentercoordinateslist findRegioncentercoordinateslist(
			Integer id) {
		return regioncentercoordinateslistRepository.findOne(id);
	}

	public List<Regioncentercoordinateslist> findAllRegioncentercoordinateslists() {
		return regioncentercoordinateslistRepository.findAll();
	}

	public List<Regioncentercoordinateslist> findRegioncentercoordinateslistEntries(
			int firstResult, int maxResults) {
		return regioncentercoordinateslistRepository.findAll(
				new org.springframework.data.domain.PageRequest(firstResult
						/ maxResults, maxResults)).getContent();
	}

	public void saveRegioncentercoordinateslist(
			Regioncentercoordinateslist regioncentercoordinateslist) {
		regioncentercoordinateslistRepository.save(regioncentercoordinateslist);
	}

	public Regioncentercoordinateslist updateRegioncentercoordinateslist(
			Regioncentercoordinateslist regioncentercoordinateslist) {
		return regioncentercoordinateslistRepository
				.save(regioncentercoordinateslist);
	}
}
